-- GENERATED SPELL FOR [Megzeg Nukklebust] --


function spell0_21283(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(15588,pUnit)
pUnit:RegisterEvent('Sorts_21283', 10306, 1)
end

function spell1_21283(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_21283', 671, 1)
end

function spell2_21283(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_21283', 2000, 1)
end

function Sorts_21283(pUnit, Event)
local choix_sorts_21283 = math.random(0, 2)
if choix_sorts_21283 == 0 then
pUnit:RegisterEvent('spell0_21283', 1, 1)
end
if choix_sorts_21283 == 1 then
pUnit:RegisterEvent('spell1_21283', 1, 1)
end
if choix_sorts_21283 == 2 then
pUnit:RegisterEvent('spell2_21283', 1, 1)
end
end

function mob21283_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21283', math.random(1500, 3000), 1)
end

function mob21283_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21283_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21283_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21283, 1, 'mob21283_Action')
RegisterUnitEvent(21283, 2, 'mob21283_Leave')
RegisterUnitEvent(21283, 3, 'mob21283_Kill')
RegisterUnitEvent(21283, 4, 'mob21283_Die')
